<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- 1.引入 Vue.js -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
    <!-- 2.准备容器 -->
    <div id="app">
      Vue的模板
      <h1>{{msg}}</h1>
      <h2>{{person}}</h2>
      <div>{{htmlStr}}</div>
      <div v-html="htmlStr"></div>
    </div>
    <script>
      // 3.创建Vue实例
      const app = new Vue({
        // 容器
        el: "#app",
        // 数据
        data: {
          msg: "hello",
          person: {
            name: "zs",
            age: 19,
          },
          htmlStr: "<button>按钮</button>",
        },
      });
      console.log(app);
    </script>
  </body>
</html>
